package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RentalSysOrdersMapper;
import com.ruoyi.system.domain.RentalSysOrders;
import com.ruoyi.system.service.IRentalSysOrdersService;

/**
 * 租赁订单Service业务层处理
 *
 * @author Mag1c_-xyy
 * @date 2024-04-25
 */
@Service
public class RentalSysOrdersServiceImpl implements IRentalSysOrdersService
{
    @Autowired
    private RentalSysOrdersMapper rentalSysOrdersMapper;

    /**
     * 查询租赁订单
     *
     * @param orderId 租赁订单主键
     * @return 租赁订单
     */
    @Override
    public RentalSysOrders selectRentalSysOrdersByOrderId(Long orderId)
    {
        return rentalSysOrdersMapper.selectRentalSysOrdersByOrderId(orderId);
    }

    /**
     * 查询租赁订单列表
     *
     * @param rentalSysOrders 租赁订单
     * @return 租赁订单
     */
    @Override
    public List<RentalSysOrders> selectRentalSysOrdersList(RentalSysOrders rentalSysOrders)
    {
        return rentalSysOrdersMapper.selectRentalSysOrdersList(rentalSysOrders);
    }

    /**
     * 新增租赁订单
     *
     * @param rentalSysOrders 租赁订单
     * @return 结果
     */
    @Override
    public int insertRentalSysOrders(RentalSysOrders rentalSysOrders)
    {
        return rentalSysOrdersMapper.insertRentalSysOrders(rentalSysOrders);
    }

    /**
     * 修改租赁订单
     *
     * @param rentalSysOrders 租赁订单
     * @return 结果
     */
    @Override
    public int updateRentalSysOrders(RentalSysOrders rentalSysOrders)
    {
        return rentalSysOrdersMapper.updateRentalSysOrders(rentalSysOrders);
    }

    /**
     * 批量删除租赁订单
     *
     * @param orderIds 需要删除的租赁订单主键
     * @return 结果
     */
    @Override
    public int deleteRentalSysOrdersByOrderIds(Long[] orderIds)
    {
        return rentalSysOrdersMapper.deleteRentalSysOrdersByOrderIds(orderIds);
    }

    /**
     * 删除租赁订单信息
     *
     * @param orderId 租赁订单主键
     * @return 结果
     */
    @Override
    public int deleteRentalSysOrdersByOrderId(Long orderId)
    {
        return rentalSysOrdersMapper.deleteRentalSysOrdersByOrderId(orderId);
    }
}
